package net.xdclass.websocket.controller.v3;

import net.xdclass.websocket.model.InMessage;
import net.xdclass.websocket.service.WebSocketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.stereotype.Controller;

/**
 * @description: 简单版单人聊天
 * @author: Yz
 * @create: 2020-07-01 13:39
 **/
@Controller
public class V3ChatRoomController {

    @Autowired
    private WebSocketService socketService;

    @MessageMapping("/v3/single/chat")
    public void singleChat(InMessage message){
        socketService.sendChatMessage(message);
    }
}
